package com.hc.service;

import com.hc.entity.Role;
import java.util.List;
import com.hc.utils.PageBean;
import com.hc.utils.PageParam;

public interface RoleService {
    int addRole(Role role);

    int addRoleSelective(Role role);

    int batchAddRole(List<Role> roleList);

    int deleteRoleById(Integer id);

	int deleteRoleByCondition(Role role);

    int batchDeleteRoleByIdList(List<Integer> idList);
	
    int updateRole(Role role);

    int updateRoleSelective(Role role);

    long getCount();

    long getCountByCondition(Role role);

    Role getRoleById(Integer id);

    List<Role> getAllRole();

	List<Role> getRoleByCondition(Role role);
	
    PageBean<Role> getRoleWithPagination(PageParam pageParam);

	PageBean<Role> getRoleWithPaginationByCondition(PageParam pageParam, Role role);

    //////////////////////////// 外键相关 /////////////////////////////////////
    List<Role> getRoleByParent(Integer parent);

    /**
     * 查看某一个Role的继承关系树中的所有父Role
     * @param id
     * @return
     */
    List<Role> selectParentRoleByChildId(Integer id);
}